using System;
using System.Collections.Generic;
using Castle.ActiveRecord;

namespace GettingStartedSample.Models
{
    [ActiveRecord]
    public class Venue : ActiveRecordBase
    {
        [PrimaryKey]
        public Int64 Id { get; set; }

        [Property]
        public string Name { get; set; }
        
        [Property]
        public string AddLine1 { get; set; }        
        
        [Property]
        public string AddLine2 { get; set; }
        
        [Property]
        public string AddLine3 { get; set; }        
        
        [Property]
        public string AddLine4 { get; set; }

        [Property]
        public string PostCode { get; set; }

        [Property]
        public string PhoneNumber { get; set; }


        public static List<Venue> FindAll()
        {
            return new List<Venue>((IEnumerable<Venue>) FindAll(typeof (Venue)));
        }

        public static Venue FindById(Int64 id)
        {
            return (Venue) FindByPrimaryKey(typeof(Venue), id);
        }
    }
}